package com.wc.util;
/**
 *	分页类
 * @author ysh
 */

import java.util.List;

public class Page<T> {

	private static final int parameterPageNo = 1;
	private static final int parameterPageSize = 5;

	private int pageNo;// 当前页码
	private int pageSize;// 每页显示的数据量
	private int totalCount;// 总数据量
	private int totalPage;// 总页数
	private List<T> list;// 用来保存查询出来数据的集合
	
	public int getPageNo() {
		return pageNo;
	}
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}

	/**
	 * 设置页数的参数
	 */
	public static void checkPage(int pageNos,int pageSizes){
		if (pageNos <= 0) {
			pageNos = parameterPageNo;
		}
		if (pageSizes <= 0) {
			pageSizes = parameterPageSize;
		}
	}
	
}
